// pages/orders/orders.js
const App = getApp()
const httpRequest=require('../../utils/httpRequest.js')

Page({
  data: {
    orders: [],
    Token:''
  },

  onLoad() {
    const userToken = wx.getStorageSync('userToken'); 
    this.setData({
      Token:userToken
    });
    this.getOrderData();
  },
  //获取订单信息
  getOrderData() {
    httpRequest.Request('GET',App.globalData.backend_add+'api/orders',{},{ 'Authorization': this.data.Token },'orders','null',this)
  },
})
